<script type="text/javascript" src="<?php echo base_url();?>/js/basic.js"></script>
<div id="content" class="testd">
<h1><?php if($title){ echo $title; } ?></h1><br>
<a href="<?php echo site_url('result/view/'.$id);?>">Back</a>
<br>
<div class="wite">
<div  id="left_div">
<?php 
foreach($assigned_question[0] as $key => $question){

?>

<table id="ques<?php echo $key;?>" class="<?php if($key=='0'){ echo 'showquestion'; }else{ echo 'hidequestion'; } ?>">
<tr><td >Question <?php echo $key+1; ?></td></tr>
<tr><td> <?php echo $question['question'];?></td></tr>
<?php
if($question['description']!=""){
?>
<tr><td><b>Description</b><br> <?php echo $question['description'];?></td></tr>
<?php
} 
$oids=explode(",",$result->oids);
foreach($assigned_question[1] as $keys => $option){
if($option['qid']==$question['qid']){
?>
<tr><td><table>
<tr><td style="width:10px; border:0px;"> <input type="radio" name="answers<?php echo $key;?>" value="<?php echo $option['oid'];?>" <?php if(in_array($option['oid'],$oids)){ echo "checked"; } ?> ></td>
<td style="border:0px;width:750px;"> <?php echo $option['option_value'];?> </td>
<td valign="top"><?php if($option['score']=="1"){ ?><img src="<?php echo base_url();?>images/tick-icon.png"><?php } ?></td></tr></table>
</td></tr>
<?php
}
}
?>
<tr><td> 
<?php
if($key >="1"){
?>
<input type="button" value="Back"  onClick="showquestion_afterquiz('<?php echo $key-1;?>');">
<?php
}

if($key!=(count($assigned_question['0'])-1)){
?>
<input type="button" value="Next"  onClick="showquestion_afterquiz('<?php echo $key+1;?>');">
<?php
}
?></td></tr>

</table>

<?php
}
?>
<input type="hidden" name="noq" id="noq" value="<?php echo $key;?>">

</div>
<div id="left_div" style="padding:10px;">
<?php 
foreach($assigned_question[0] as $key => $question){
?>
<div class="count_btn" onClick="showquestion_afterquiz('<?php echo $key;?>');"><?php echo $key+1;?></div>
<?php
}
?>
</div>

<div style="clear:both"></div>
</div>

</div>
